import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Scanner;


public class _07_DaysBetwenTwoDates {

	public static void main(String[] args) throws ParseException {

		Scanner inputCS = new Scanner(System.in);
		String userInputDate1 = inputCS.nextLine();
		String userInputDate2 = inputCS.nextLine();
		inputCS.close();

		SimpleDateFormat sampleDateFormat = new SimpleDateFormat("dd-MM-yyyy");
        Date date1 = sampleDateFormat.parse(userInputDate1);
        Date date2 = sampleDateFormat.parse(userInputDate2);
        
        System.out.println((int)(date2.getTime() - date1.getTime()) / (1000 * 60 * 60 * 24));
	}
}